<template>
  <van-card
    v-for="currentNew of news"
    :price="currentNew.source"
    :desc="currentNew.digest"
    :title="currentNew.title"
    :thumb="currentNew.imgsrc"
    currency=""
  >
    <template #footer>
      <Button color="#3E87F5" @click="addBookmark(currentNew)">收藏</Button>
      <Button>隐藏</Button>
    </template>
  </van-card>
</template>

<script setup>
import Button from "@/ui/Button.vue";
import { appendLocalStorage } from "@/utils/storageHelper";

const props = defineProps(["news"]);

const addBookmark = (addNew) => {
  appendLocalStorage("bookmark", addNew);
};
</script>
